import request from '@/utils/request'

// 查询退单列表
export function listChargeBack(query) {
  return request({
    url: '/store/chargeBack/list',
    method: 'get',
    params: query
  })
}

// 查询退单详细
export function getChargeBack(backSerial) {
  return request({
    url: '/store/chargeBack/' + backSerial,
    method: 'get'
  })
}

// 新增退单
export function addChargeBack(data) {
  return request({
    url: '/store/chargeBack',
    method: 'post',
    data: data
  })
}

// 修改退单
export function updateChargeBack(data) {
  return request({
    url: '/store/chargeBack',
    method: 'put',
    data: data
  })
}

// 删除退单
export function delChargeBack(backSerial) {
  return request({
    url: '/store/chargeBack/' + backSerial,
    method: 'delete'
  })
}
export function chargeBack(data) {
  return request({
    url: '/store/chargeBack/editStatus',
    method: 'put',
    data: data
  })
}